1. Field of the Invention
The present invention relates to volume control of digital audio signals, and more particularly, to audio signal processing methods capable of controlling the volume of a digital audio signal, and related devices.
2. Description of the Prior Art
Regarding a portable electronic device, the speaker installed therein is typically quite tiny so it can be contained in a compact shell of the portable electronic device. In addition, as the internal space of the compact shell may not contain too many components, and as the overall material cost of the portable electronic device should be controlled according to a budget in a design phase, the calculation capability of the portable electronic device is typically quite limited.
Taking a cellular phone as an example, driving a tiny speaker within the cellular phone to output an acceptable volume is quite workable. As the magnitude of audio signals vary in accordance with the content of the media to be played back (e.g. audio media or video media), and as the magnitude of an audio signal generated while playing back the same medium may also vary in accordance with different portions of the content of the medium, volume control has become a necessary mechanism within this kind of portable electronic device, to prevent this tiny speaker from being burned out due to an excessive audio signal. However, the conventional volume control mechanism typically over-uses or over-relies on the calculation capability of the portable electronic device, or requires too many additional components that make the circuitries of the portable electronic devices too complex.
Please refer to FIG. 1. A volume control circuit according to the prior art as shown in FIG. 1 comprises an absolute value calculation unit 10, a detection unit 20, a gain processing unit 30, and a multiplier 40. The absolute value calculation unit 10 is utilized for calculating an absolute value |x(n)| of an audio sample x(n) carried by a digital audio signal, and the detection unit 20 performs volume detection according to the absolute value |x(n)| to generate a detection result e(n). In addition, the gain processing unit 30 controls a gain value g(n) according to the detection result e(n), so the multiplier 40 multiplies the audio sample x(n) by the gain value g(n) to generate the volume-adjusted audio sample y(n). The volume control circuit shown in FIG. 1 belongs to a sample-based volume control mechanism, so problems such as sample related distortions may easily occur.
As mentioned, the conventional volume control mechanism for the portable electronic devices according to the prior art is typically too complex or typically over-uses the calculation capability of the portable electronic devices, and problems such as sample related distortions may often occur.